package com.tenebrous.jestic.mapper.idao.framwork.meber.organ;

import com.tenebrous.jestic.entity.framwork.meber.organ.OrgRoster;
import com.tenebrous.jestic.mapper.ISuperMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

//@Mapper
public interface OrgRosterMapper extends ISuperMapper<OrgRoster> {

    List<OrgRoster> selectStandardList(@Param("hisid") String hisid, @Param("companyids") String[] companyids, @Param("departmentid") String departmentid, @Param("politiCode") String politiCode, @Param("edutionCode") String edutionCode,
                                       @Param("degreeCode") String degreeCode, @Param("sexCode") String sexCode, @Param("realname") String realname);

    @Select("SELECT A.* FROM ORG_ROSTER A,ORG_ROSTER_HISTORY B WHERE B.ACTIVED=1 AND B.ID=A.HISID ORDER BY A.SORT ")
    List<OrgRoster> selectDefultStandardList();

    @Delete("DELETE FROM ORG_ROSTER WHERE HISID=#{hisid}")
    void deleteByHisid(@Param("hisid") String hisid);
}